package com.loto.insurance.mis.web.service;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.loto.insurance.mis.web.db.mapper.OemInfoMapper;
import com.loto.insurance.mis.web.entity.OemInfo;

@Service
public class AuthorityService {

  @Autowired
  OemInfoMapper oemInfoMapper;

  public long getCustFid(String id, String acc, String pin) {
	long custFid = 0;
	Map<String, String> params = new HashMap<String, String>();
	params.put("id", id);
	params.put("acc", acc);
	params.put("pin", pin);
	OemInfo oemInfo = oemInfoMapper.findOemByIdAccPin(params);
	if (oemInfo != null)
	  custFid = oemInfo.getOemCustFid();
	return custFid;
  }

  public OemInfo getPayInfo(String id, String acc, String pin) {
	Map<String, String> params = new HashMap<String, String>();
	params.put("id", id);
	params.put("acc", acc);
	params.put("pin", pin);
	return oemInfoMapper.findOemByIdAccPin(params);
  }
}
